﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using DigiLib;
using BusinessObjects.BO_GetObjects;
public partial class Administrator_Controls_Admin_Artlinks_aDDnEW : Admin_Controls_Base
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            
        }
    }
    //load Ckeditor
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        string thumps=base.Upload("Thumps","../Thumps/"+fupThumb.FileName,fupThumb,divMessage,true);
        string name = txtName.Text;
        int YearBorn = int.Parse(txtBirthDay.Text);
        string email = txtEmail.Text;
        string title = txtTitle.Text;
        string webLink = txtWebSite.Text;
        int Order_Display = int.Parse(txtViTri.Text);
        DateTime createDate = DateTime.Now;
        string CreateBy = "tinhcd";
        DateTime modifyDate = DateTime.Now;
        string modifyBy="khoangpv";
        bool status = true;
        string result = BO_art_link.Insert(name, YearBorn, email, title, thumps, webLink, Order_Display, createDate, CreateBy, modifyDate, modifyBy, status);
        if (result == "0")
        {
            divMessage.InnerHtml = MessageBox.Error("Hệ Thống", "Chèn dữ liệu lỗi , vui lòng kiểm tra lại");
        }
        else
        {
            divMessage.InnerHtml = MessageBox.Success("Hệ thống","Chèn dữ liệu thành công");
        }
    }
}